﻿<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.kbwsoft.esiframe.usermanage.*"%>
<%@ page import="com.kbwsoft.esiframe.core.util.*"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/" + "mobileweb";

    Userxx user = (Userxx)session.getAttribute(GlobalNames.LOGIN_USER);

    String userid = "";
    String username = "";
    String usertype = "";
    boolean isLog = false;
    if( user == null || user.getUserid().equals("") ){

    }else{
      isLog = true;
      userid = user.getUserid();
      username = user.getUsername();
      usertype = user.getProp("usertype");
    }
%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>垂直检测医疗服务平台 | 信锐利鸿</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="format-detection" content="telephone=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
	<script type="text/javascript" src="<%=basePath%>/assets/js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/jquery.easyui-1.2.4.js"></script>
    <script type="text/javascript" src="<%=basePath%>/assets/js/amazeui.min.js"></script>
    <script type="text/javascript" src="../js/mask.js"></script>
    <link rel="alternate icon" type="image/png" href="<%=basePath%>/assets/i/favicon.png">
    <link rel="stylesheet" href="<%=basePath%>/assets/css/amazeui.min.css"/>
    <style>
        .get {
            background: #1E5B94;
            color: #fff;
            text-align: center;
            padding: 100px 0;
        }

        .get-title {
            font-size: 200%;
            border: 2px solid #fff;
            padding: 20px;
            display: inline-block;
        }

        .get-btn {
            background: #fff;
        }

        .detail {
            background: #fff;
        }

        .detail-h2 {
            text-align: center;
            font-size: 150%;
            margin: 40px 0;
        }

        .detail-h3 {
            color: #1f8dd6;
        }

        .detail-p {
            color: #7f8c8d;
        }

        .detail-mb {
            margin-bottom: 30px;
        }

        .hope {
            background: #0bb59b;
            padding: 50px 0;
        }

        .hope-img {
            text-align: center;
        }

        .hope-hr {
            border-color: #149C88;
        }

        .hope-title {
            font-size: 140%;
        }

        .about {
            background: #fff;
            padding: 40px 0;
            color: #7f8c8d;
        }

        .about-color {
            color: #34495e;
        }

        .about-title {
            font-size: 180%;
            padding: 30px 0 50px 0;
            text-align: center;
        }

        .footer p {
            color: #7f8c8d;
            margin: 0;
            padding: 15px 0;
            text-align: center;
            background: #2d3e50;
        }
    </style>
</head>

<body>
<header class="am-topbar am-topbar-fixed-top">
    <div class="am-container">
        <h1 class="am-topbar-brand">
            <a href="#">垂直检测医疗服务平台</a>
        </h1>
        <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-secondary am-show-sm-only"
                data-am-collapse="{target: '#collapse-head'}"><span class="am-sr-only">导航切换</span> <span
                class="am-icon-bars"></span></button>
        <div class="am-collapse am-topbar-collapse" id="collapse-head">
            <ul class="am-nav am-nav-pills am-topbar-nav">
                <li><a href="<%=basePath%>/index.jsp">首页</a></li>
                <li><a href="<%=basePath%>/center.jsp">检测中心</a></li>
                <li class="am-dropdown" data-am-dropdown>
                    <a class="am-dropdown-toggle" data-am-dropdown-toggle href="javascript:;">
                        其他 <span class="am-icon-caret-down"></span>
                    </a>
                    <ul class="am-dropdown-content">
                        <li class="am-dropdown-header">标题</li>
                        <li><a href="<%=basePath%>/aboutus.jsp">公司简介</a></li>
                        <li><a href="<%=basePath%>/list.jsp">最新动态</a></li>
                        <li><a href="<%=basePath%>/list.jsp">科普知识</a></li>
                        <li><a href="<%=basePath%>/contactus.jsp">联系我们</a></li>
                        <li><a href="<%=basePath%>/qa.jsp">常见问题</a></li>
                    </ul>
                                <%if( user != null && !user.getUserid().equals("") ){%>
            <div class="am-topbar-right">
                <%if(usertype.equals("01")){%>
                <button class="am-btn am-btn-secondary am-topbar-btn am-btn-sm" onclick="location='<%=basePath%>/loadUserOrd.jsp?type=p1'"><span class="am-icon-pencil"></span> 个人中心
                </button>
                <%}else if(usertype.equals("02")){%>
                <button class="am-btn am-btn-secondary am-topbar-btn am-btn-sm" onclick="location='<%=basePath%>/doctor.jsp?type=d1'"><span class="am-icon-pencil"></span> 个人中心
                </button>
                <%}%>
            </div>
            <%}else{%>
            <div class="am-topbar-right">
                <button class="am-btn am-btn-primary am-topbar-btn am-btn-sm" onclick="location='<%=basePath%>/login.jsp'"><span class="am-icon-user"></span> 登录
                </button>
            </div>
            <%}%>
                </li>
            </ul>
        </div>
    </div>
</header>

<!-- 表单开始 -->
<form name="formLogin" id="formLogin" method="post" class="am-form" action="">
  <input id="verifyCodeflag" name="verifyCodeflag" type="hidden" value="1" />
   <!--<input id="usertype" name="usertype" type="hidden" value="01" />-->
  <fieldset>
    <!--<legend>用户登录</legend>-->
	<div class="am-form-group ">
	  <label class="am-radio-inline am-avg-sm-2">
        <input type="radio" id="usertype" name="usertype" value="01" data-am-ucheck checked>我不是医生
      </label>
      <label class="am-radio-inline am-avg-sm-2">
        <input type="radio" id="usertype" name="usertype" value="02" data-am-ucheck >我是医生
      </label>
	</div>


	<div class="am-input-group <!--am-input-group-primary-->">
    <span class="am-input-group-label"><i class="am-icon-user am-icon-fw"></i></span>
    <input type="text" class="am-form-field"  id="usercode" name="usercode" placeholder="用户名，可以是您的手机或电子邮箱" required>
    </div>
<p></p>
    <div class="am-input-group <!--am-input-group-warning-->">
      <span class="am-input-group-label"><i class="am-icon-lock am-icon-fw"></i></span>
      <input type="password" class="am-form-field" id="password" name="password" placeholder="请输入密码" required>
    </div>
	<p></p>
	<div class="am-input-group <!--am-input-group-danger-->" >
      <span class="am-input-group-label"><i class="am-icon-money am-icon-fw"></i></span>
      <input type="text" class="am-form-field" id="verifyCode" name="verifyCode" placeholder="验证码，点击图片刷新" required>

    </div>
<p><img id="verifyCodeImage" src="ValidateImageServlet" class="biao1" onClick="$(this).attr('src','ValidateImageServlet?'+Math.random());" /></p>
    <p class="am-avg-sm-2"><button type="text" class="am-u-sm-centered am-btn am-btn-warning am-radius" id="sub" onClick="doLogin();">提交</button></p>
  </fieldset>
</form>

  <footer data-am-widget="footer" class="am-footer am-footer-default" data-am-footer="{  }">
    <div class="am-footer-miscs ">
        <p>ADD:天津市东丽区华明高新区低碳产业基地B4-210室 </p>
        <p>CopyRight©2015 <a href="<%=basePath%>/aboutus.html" target="_blank">垂直检测医疗服务平台</a> All Rights Reserved.</p>
        <p>津ICP备15008369号-1</p>
    </div>
  </footer>

</body>
</html>

<script language="javascript">

$('#formLogin').form({
    url: "MainServlet.action?fid=F00.00.00.00",
    onSubmit: function() { //自定义验证

    },
    success: function(data) { //处理成功
		      var utype = $("input[name='usertype']:checked").val();
	  if(utype=="01"){
		  //alert("huanzhebiejie");
		  location.href = "loadUserOrd.jsp?type=p1&userid=&duserid=";
	  }else if(utype == "02"){
		  location.href = "doctor.jsp";
	  }
    },
    failure: function(data) { //处理失败
        alert(data.errormessage);
    }
});

function doLogin() {
	//var a = $('#usertype').value();
	//alert(a);
    //$('#formLogin').submit();
}

</script>
